﻿#if NETFX

using NicoView.Model.Platform.Speachers.Bouyomichan;
using NicoView.Model.Platform.Speachers.Sapi;

#endif


using NicoView.Model.Share.Speech.Learn;
using NicoView.Model.Speech;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NicoView.Model.Share.Speech;

namespace NicoView.Model.Platform.Speachers
{
    public class NicoViewSpeachersFactory : INicoViewSpeachersFactory
    {

        private NicoViewSpeachersFactory()
        {
            

        }

        private static NicoViewSpeachersFactory current = null;

        public static INicoViewSpeachersFactory Current
        {
            get
            {
                if (current == null)
                {
                    current = new NicoViewSpeachersFactory();
                }

                return current;
            }

        }



#if NETFX
        public IEnumerable<ISpeacherProvider> CreateSpaeckers(RegexLearnDictionary regexLearnDictionary, LearnDictionary learnDictionary)
        {
            var speachers = new List<SpeacherProviderBase>();
            speachers.AddRange(SapiSpeacherProvider.GetInstalledProvider(regexLearnDictionary,learnDictionary));
            speachers.AddRange(BouyomichanProvider.GetInstalledProvider(regexLearnDictionary, learnDictionary));
            return speachers;
        }
#elif NETFX_CORE || WINDOWS_PHONE
        public IEnumerable<ISpeacherProvider> CreateSpaeckers(RegexLearnDictionary regexLearnDictionary, LearnDictionary learnDictionary)
        {
            SpeacherProviderBase[] speacherProviders = {};
            return speacherProviders;
        }
    
#endif

    }
}
